package com.sctvcloud.zhaohua_sd.ui.adapter.holder;

import android.content.Context;
import android.view.View;
import android.widget.LinearLayout;

import com.ruihang.generalibrary.ui.widget.CustomFontTextView;
import com.sctvcloud.zhaohua_sd.R;
import com.sctvcloud.zhaohua_sd.beans.Titles;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Created by Administrator on 2017/7/12 0012.
 */

public class AnchorTitleHolder extends BaseAnchorHolder<Titles> {
    @BindView(R.id.item_anchor_title_name)
    protected CustomFontTextView name;
    @BindView(R.id.item_anchor_title_ll)
    protected LinearLayout anchor_ll;
    @BindView(R.id.item_anchor_title_divider)
    protected View divider;

    public AnchorTitleHolder(Context context, View itemView) {
        super(context, itemView);
    }

    @Override
    protected void initInject() {
        ButterKnife.bind(this, itemView);
    }

    @Override
    public void setData(Titles data) {
        name.setText(data.getTitle());
        anchor_ll.setVisibility(View.GONE);
        if (data.getTitle().equals(context.getString(R.string.anchor_dynamics))) {
            divider.setVisibility(View.VISIBLE);
        } else {
            divider.setVisibility(View.GONE);
        }

    }
}
